User loginNavigation |
Parametric datatype-genericity
Parametric datatype-genericity. Jeremy Gibbons and Ross Paterson. Submitted for publication.
Datatype-generic programs are programs that are parametrized by a datatype or type functor. There are two main styles of datatype-generic programming: the Algebra of Programming approach, characterized by structured recursion operators parametrized by a shape functor, and the Generic Haskell approach, characterized by case analysis over the structure of a datatype. We show that the former enjoys a kind of parametricity, relating the behaviours of generic functions at different types; in contrast, the latter is more ad hoc, with no coherence required or provided between the various clauses of a definition. How could we have not mentioned this before? The main result of this paper is that fold is a higher-order natural transformation. This means, the authors explain, that fold is a rather special kind of datatype-generic operator, both enjoying and requiring coherence between its datatype-specific instances. We had several long discussions about the uniqueness of fold, which may serve as an introduction for those new to this sort of discussion. The tutorial on the universality of fold is, of course, on the papers page. For some reason I feel a craving for bananas... By Ehud Lamm at 2007-12-04 07:24 | Category Theory | Functional | 6 comments | other blogs | 9749 reads
DySy: Dynamic Symbolic Execution for Invariant Inference
DySy: Dynamic Symbolic Execution for Invariant Inference. Christoph Csallner, Nikolai Tillmann, Yannis Smaragdakis
Dynamically discovering likely program invariants from concrete test executions has emerged as a highly promising software engineering technique. Dynamic invariant inference has the advantage of succinctly summarizing both “expectedâ€program inputs and the subset of program behaviors that is normal under those inputs. In this paper, we introduce a technique that can drastically increase the relevance of inferred invariants, or reduce the size of the test suite required to obtain good invariants. Instead of falsifying invariants produced by pre-set patterns, we determine likely program invariants by combining the concrete execution of actual test cases with a simultaneous symbolic execution of the same tests. The symbolic execution produces abstract conditions over program variables that the concrete tests satisfy during their execution. In this way, we obtain the benefits of dynamic inference tools like Daikon: the inferred invariants correspond to the observed program behaviors. At the same time, however, our inferred invariants are much more suited to the program at hand than Daikon’s hardcoded invariant patterns. The symbolic invariants are literally derived from the program text itself, with appropriate value substitutions as dictated by symbolic execution. We implemented our technique in the DySy tool, which utilizes a powerful symbolic execution and simplification engine. The results confirm the benefits of our approach. In Daikon’s prime example benchmark, we infer the majority of the interesting Daikon invariants, while eliminating invariants that a human user is likely to consider irrelevant. The Daikon invariant detector mentioned in the abstract is here. Seems like a pretty straightforward idea, I guess, but as always: God is in the details. Quantifying the Performance of Garbage Collection vs. Explicit Memory ManagementI think the real culprit behind the "poor performance" of GC languages is demonstrated in Quantifying the Performance of Garbage Collection vs. Explicit Memory Management, by Matthew Hertz and Emery D. Berger:
Overall, generational collectors can add up to 50% space overhead and 5-10% runtime overheads if we ignore virtual memory. Very reasonable given the software engineering benefits. However, factoring in virtual memory with its attendant faulting paints a very different picture in section 5.2:
Considering the prevalence of virtual memory, this poses a significant problem for garbage collected languages, server-side systems in particular. LTU has covered garbage collectors that co-operate with virtual memory managers before by the same authors. Evolutionary Programming and Gradual Typing in ECMAScript 4Evolutionary Programming and Gradual Typing in ECMAScript 4, by Lars T Hansen, Adobe Systems, is an 18 page tutorial detailing features of ECMAScript 4, and how they can be applied to existing ECMAScript code to improve it.
Logic for PhilosophyA draft textbook by Theodore Sider aimed at philsophy graduate students that while not as technical as computer scientists are used to, may be of interest due to the explicit discussion of extensions (e.g., modal operators), deviations (e.g., multi-valued logic) and variations (such as the Sheffer Stroke) on basic propositional logic. The book includes chapters on counterfactuals and two-dimensional modal logic that may include material new to PLT wonks. ClojureHaven't noticed it being mentioned here yet: In the actor-concurrency vein, Clojure is vaguely like Elang, but targeting the JVM. Some comparisons vs. Erlang have been made. OCaml Light: A Formal Semantics For a Substantial Subset of the Objective Caml LanguageOCaml Light: a formal semantics for a substantial subset of the Objective Caml language.
From a team including Peter Sewell (Acute, HashCaml, Ott). I continue to believe that things are heating up nicely in mechanized metatheory, which, in the multicore/multiprocessor world in which we now live, is extremely good news. By Paul Snively at 2007-11-26 18:33 | Functional | General | Implementation | Object-Functional | Semantics | Theory | Type Theory | 2 comments | other blogs | 10686 reads
The Carnap Programming Language
Inductive Synthesis of Functional Programs: An Explanation Based Generalization ApproachInductive Synthesis of Functional Programs: An Explanation Based Generalization Approach We describe an approach to the inductive synthesis of recursive equations from input/output-examples which is based on the classical two-step approach to induction of functional Lisp programs of Summers (1977). In a first step, I/O-examples are rewritten to traces which explain the outputs given the respective inputs based on a datatype theory. These traces can be integrated into one conditional expression which represents a non-recursive program. In a second step, this initial program term is generalized into recursive equations by searching for syntactical regularities in the term. Our approach extends the classical work in several aspects. The most important extensions are that we are able to induce a set of recursive equations in one synthesizing step, the equations may contain more than one recursive call, and additionally needed parameters are automatically introduced. Is this the future of programming? Samurai - Protecting Critical Data in Unsafe LanguagesSamurai - Protecting Critical Data in Unsafe Languages. Karthik Pattabiraman, Vinod Grover, Benjamin G. Zorn.
An acceptable overhead for the pleasure of using an unsafe language? You decide. |
Browse archives
Active forum topics |
Recent comments
2 weeks 3 days ago
2 weeks 3 days ago
2 weeks 5 days ago
2 weeks 5 days ago
3 weeks 3 days ago
3 weeks 3 days ago
3 weeks 3 days ago
6 weeks 3 days ago
7 weeks 2 days ago
7 weeks 2 days ago